<template>
    <div>
        <el-form :model="userInfo" status-icon ref="stuInfo" label-width="100px" class="demo-ruleForm"
                 style="width: 30%">
            <el-form-item label="账号" prop="oldPass">
                <el-input v-model="userInfo.logincode" autocomplete="off" size="small"></el-input>
            </el-form-item>
            <el-form-item label="角色">
                <el-input v-model="userInfo.roleName" size="small"></el-input>
            </el-form-item>
            <el-form-item label="姓名">
                <el-input v-model="userInfo.username" size="small"></el-input>
            </el-form-item>
            <el-form-item label="电话">
                <el-input v-model="userInfo.iphone" size="small"></el-input>
            </el-form-item>
            <el-form-item label="性别">
                <el-input v-model="userInfo.sex==0?'女':userInfo.sex==1?'男':''" size="small"></el-input>
            </el-form-item>
            <el-form-item label="注册时间">
                <el-input v-model="userInfo.registerTime" size="small"></el-input>
            </el-form-item>
            <el-form-item label="所属机构">
                <el-input v-model="userInfo.orgName" size="small"></el-input>
            </el-form-item>

        </el-form>
    </div>
</template>

<script>
    import {getUserRoleInfo} from "@/api/roleApi";

    export default {
        name: "userInfo",
        data() {
            return {
                userInfo: {}
            }
        },
        created() {
            this.getUserInfo();
        },
        methods: {
            getUserInfo() {
                getUserRoleInfo().then(res => {
                    this.userInfo = res;
                })
            }

        }
    }
</script>

<style scoped>

</style>